package main.java.com.silence.dao;

import com.silence.pojo.Bill;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Author: silence
 * Date: 17-6-3
 */
public interface IBillDao {

    Bill selectByPrimaryKey(Integer id);

    int insert(Bill bill);

    int deleteByPrimaryKey(Integer id);

    List<Bill> selectAllByOwnerId(@Param("ownerId") Integer ownerId, @Param("option") Map option);

    int update(Bill bill);

    List<Bill> selectAllByOwnerEmail(@Param("email") String email, @Param("option") Map option);

    List<Bill> selectAllByOwnerEmailAndCreateDate(@Param("email") String email, @Param("params") Map params);

    int selectOwnerByBillId(Integer id);

    int countByOwner(@Param("ownerId") Integer ownerId);

    int countByEmail(@Param("email") String email);

    int countByEmailAndCreateDate(@Param("email") String email, @Param("createDate") Date createDate);
}
